package nix.ssm.service;

import java.util.List;

import nix.ssm.dao.ItemMapper;
import nix.ssm.pojo.Item;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(isolation=Isolation.REPEATABLE_READ,propagation=Propagation.REQUIRED,readOnly=false)
public class ItemServiceImpl implements ItemService {

	@Autowired
	private ItemMapper itemMapper;
	
	public List<Item> findList() {
		return itemMapper.findList();
	}
	
	public Item findById(Integer id) {
		return itemMapper.findById(id);
	}
	
	public void update(Item item) {
		itemMapper.update(item);
	}
}
